From c57c50c1de759583d5de629fec205254280da4f0 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Wed, 17 Jul 2013 12:18:51 +0100 Subject: [PATCH] xen: arm: clear the exclusive monitor on exception return Otherwise context switching between two vcpus which are contending the same lock can result in a spurious success. Our spinlock and atomics code (which we get from Linux) rely on this behaviour because they use non-exclusive stores for single instruction operations (e.g. spin_unlock or atomic_set). This is not required on ARMv8 since eret implicitly clears the monitor. Signed-off-by: Ian Campbell Acked-by: Stefano Stabellini Acked-by: Tim Deegan --- xen/arch/arm/arm32/entry.S | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/arm/arm32/entry.S b/xen/arch/arm/arm32/entry.S index 76814dd5eb..1c26835474 100644 --- a/xen/arch/arm/arm32/entry.S +++ b/xen/arch/arm/arm32/entry.S @@ -117,6 +117,7 @@ ENTRY(return_to_hypervisor) msr SPSR_hyp, r11 pop {r0-r12} add sp, #(UREGS_SP_usr - UREGS_sp); /* SP, LR, SPSR, PC */ + clrex eret /* -- 2.30.2